<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ page contentType="text/html;charset=UTF-8"%>

<!DOCTYPE html>
<html lang="en">
<head>
	
	<title>登录</title>
	<link href="<s:url value="/resources/css/bootstrap.css"/>" rel="stylesheet" />
	<link href="<s:url value="/resources/css/charisma/charisma-app.css"/>" rel="stylesheet" />
	<link href="<s:url value="/resources/css/charisma/uniform.default.css"/>" rel="stylesheet"/>

	<!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	  <script src="<s:url value="/resources/js/charisma/html5.js"/>"></script>
	<![endif]-->

	<link rel="shortcut icon" href="<s:url value="/resources/images/favicon.ico"/>"/>
		
</head>

<body>
		<div class="container-fluid">
		<div class="row-fluid">
		
			<div class="row-fluid">
				<div class="span12 center login-header">
					<h2>中国电信IP RAN综合管理系统</h2>
				</div>
			</div>
			
			<div class="row-fluid">
				<div class="well span5 center login-box">
					<div class="alert alert-info">
						请输入用户名和密码登录
					</div>
					<div>
						<span style="color:red">
						<%
							Exception ex = ((Exception)session.getAttribute("SPRING_SECURITY_LAST_EXCEPTION"));
							if(ex != null){
								if("validatecodeerror".equalsIgnoreCase(ex.getMessage())){
									%>
									<s:message text="验证码错误!" />
									<%
								}else{
									%>
									<s:message text="登录失败！用户名或密码错误！"/>
									<%
								}
							}
						%>
					</span>  
					</div>
					<s:url value="/j_spring_security_check" var="login" />
					<form class="form-horizontal" action="${login}" method="post">
						<fieldset>
							<div class="input-prepend" title="用户名" data-rel="tooltip">
								<span class="add-on"><i class="icon-user"></i></span><input autofocus class="input-large span10" name="j_username" id="username" type="text" value="sa" />
							</div>
							<div class="clearfix"></div>

							<div class="input-prepend" title="密码" data-rel="tooltip">
								<span class="add-on"><i class="icon-lock"></i></span><input class="input-large span10" name="j_password" id="password" type="password" value="p" />
							</div>
							<div class="clearfix"></div>

							<div class="input-prepend">
							<label class="remember" for="remember"><input type="checkbox" id="remember" />记住密码</label>
							</div>
							<div class="clearfix"></div>

							<p class="center span5">
							<button type="submit" class="btn btn-primary">登录</button>
							</p>
						</fieldset>
					</form>
				</div>
			</div>
		</div>
		
	</div>

	<script src="<s:url value="/resources/js/jquery/jquery-1.8.2.min.js"/>"></script>
	<script src="<s:url value="/resources/js/jquery/jquery.uniform.min.js"/>"></script>
	<script>
	$(function(){
		$("input:checkbox, input:radio, input:file").not('[data-no-uniform="true"],#uniform-is-ajax').uniform();
	});
	</script>
</body>
</html>
